public class Code20250402 {
    public static void selectSort(int array[]) {
        for (int i = 0; i < array.length; i++) {
            int min = array[i];
            for (int j = i + 1; j < array.length; j++) {
                if(array[j] < array[i]) {
                    min = array[j];
                }
            }
            swap(array,array[i],min);
        }
    }
    public static void swap(int array[],int i,int j) {
        int tmp = 0;
        tmp = array[i];
        array[i] = array[j];
        array[j] = tmp;
    }
}

